#include <iostream>
#include <type_traits>
using namespace std;

class A {
  public:
    A() = default;
    A(const A &) = default;
    virtual void Show() const;
    virtual ~A() {}
};

class B : public A {
  public:
    void Show() const override;
};

void A::Show() const { cout << "A" << endl; }

void B::Show() const { cout << "B" << endl; }

static void Fun1(A obj) { obj.Show(); }
static void Fun2(const A &obj) { obj.Show(); }

int main() {
    B b;
    Fun1(b);
    Fun2(b);

    A *p = new B;
    p->A::Show();
    p->Show();

    return 0;
}
